﻿Public Class FormSignOn
	Public prevForm As Form


	Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
		If TextBoxUsername.Text = "" Then
			Dim errormsg As MsgBoxResult = MsgBox("Must enter a user name.", MsgBoxStyle.OkOnly, "Invalid User Name")
		Else
			My.Settings.user_name = TextBoxUsername.Text
            Me.Hide()
            FormAuthentication.ShowDialog()
            Me.Show()
			Me.DialogResult = Windows.Forms.DialogResult.OK
			Me.Close()
		End If
	End Sub

	Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
		Me.Close()
	End Sub

	Private Sub FormSignOn_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
		TextBoxUsername.Text = My.Settings.user_name

	End Sub

    Private Sub TextBoxUsername_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBoxUsername.TextChanged

    End Sub
End Class
